//auto gen by paipai.java.augogen ver 143
//author floatman
#ifndef _GISAO_GIS_H_
#define _GISAO_GIS_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_gisao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <set>
#include <map>
#include "erp/gis/po/ipaddresspo_gis.h"
#include "erp/gis/po/regionpo_gis.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
using namespace c2cent::library::wtimeelf;
HEADER_SELF_DEFINE_END

namespace erp
{
namespace gis
{
namespace ao
{

#define GISAO_SERVICE_VERSION "ERP_GIS_AO___GISAO__SERVICE_VERSION__1.0 2013-08-15 10:53:06"
const std::string GISAO_SERVICE_NOUSE = GISAO_SERVICE_VERSION;

SERVICE class CGisAo : public IGisAo{
public:
		CGisAo(enum DeployMethod method = DEPLOY_STANDALONE);
		~CGisAo();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    根据IP获取地址信息 
	 *
	 */
	EXPORT(0xC66A1801) uint32_t GetIpAddressByIp(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint32_t> & setIpList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint32_t,erp::gis::po::CIpAddressPo> & mapIpAddress,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    根据IP获取地区列表信息，由高到低 
	 *
	 */
	EXPORT(0xC66A1802) uint32_t GetSmallestRegionByIp(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint32_t> & setIpList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint32_t,std::vector<erp::gis::po::CRegionPo> > & mapSmallestRegion,
		 std::string& strOutReserve
		);
SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
private:
        std::string m_strMachineKey;
        std::string m_strSource;
        std::string m_strClientIP;
        uint32_t m_dwSceneId;
        uint32_t m_dwOperatorUin;

        static CItilGroup m_oGetIpAddressByIp_Group;
SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};

}
}
}

#endif /* _GISAO_HELLOGIS_H_ */
